package com.x.netty.oio;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * 阻塞的时间服务端
 *
 * @author _G5niusX
 * @date 2018/5/16
 */
public class OIOTimeServer {
    static final int PORT = 8080;
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(PORT);
        while (true) {
            final Socket accept = serverSocket.accept();
            new Thread(new OIOTimeHandler(accept)).start();
        }
    }
}
